package com.forum.controller;

import com.forum.annotation.IgnoreAuth;
import com.forum.entity.AboutUsentity;
import com.forum.service.IAboutUsService;
import com.forum.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/aboutus")
public class AboutUsController {

    @Autowired
    private IAboutUsService iAboutUsService;

    @IgnoreAuth
    @GetMapping("/detail/{id}")
    public R detail(@PathVariable Long id){
        AboutUsentity aboutUsentity = iAboutUsService.selectById(id);
        return R.ok().put("data",aboutUsentity);
    }
}
